package com.lin.mybatis.config;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;

/**
 * @作者: 林江
 * @创建时间: 2024/4/27
 * @功能:
 */
public class MybatisCommonConfig {
    /**
     * -------------------------------
     * mybatis-plus的内置插件配置
     * -------------------------------
     *
     * @return
     */
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
        return interceptor;
    }



}
